// Copyright (C) Microsoft Corporation. All rights reserved.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;

namespace Microsoft.DDSolutions.UI
{
    public class GradientForm : Form
    {
        protected override void OnPaintBackground(PaintEventArgs pevent)
        {
            pevent.Graphics.CompositingQuality = CompositingQuality.HighQuality;

            base.OnPaint(pevent);

            Rectangle hline;
            LinearGradientBrush hlinebr;

            hline = new Rectangle(0, 0, this.Width, this.Height);
            hlinebr = new LinearGradientBrush(hline, Color.FromArgb(131, 166, 244), Color.FromArgb(0, 60, 165), LinearGradientMode.ForwardDiagonal);
            pevent.Graphics.FillRectangle(hlinebr, hline);

        }

    }
}
